package com.nbjtjc.safe.api.edu;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.nbjtjc.safe.bean.Result;
import com.nbjtjc.safe.model.edu.EduRequirementSurveyItemsTemplet;
import com.nbjtjc.safe.model.edu.EduRequirementSurveyTemplet;
import com.nbjtjc.safe.service.edu.EduRequirementSurveyTempletService;

@RestController
@CrossOrigin("*")
@RequestMapping("/eduReqTemplet")
public class EduRequirementSurveyTempletController {
	@Autowired
	private EduRequirementSurveyTempletService eduRequirementSurveyTempletService;
	
	
	  @RequestMapping(value = "/find", method = {RequestMethod.POST})
	  public Result find(@RequestBody EduRequirementSurveyTemplet eduRequirementSurveyTemplet) {
	        Result result = new Result();
	        try {
	            result = eduRequirementSurveyTempletService.find(eduRequirementSurveyTemplet);
	        } catch (Exception e) {
	            e.printStackTrace();
	            result.setFalse(e.getMessage());
	        }
	        return result;
	    }
}
